home *** CD-ROM | disk | FTP | other *** search
/ Freelog 22 / freelog 22.iso / Prog / Djgpp / GPC2952B.ZIP / doc / gpc / docdemos / rmdirdemo.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-02-09  |  313 b   |  14 lines

  1. program RmDirDemo;
  2. var
  3.   Foo: String (127);
  4. begin
  5.   WriteLn ('Enter directory name to remove: ');
  6.   ReadLn (Foo);
  7.   {$i-}                     { Suppress exit on error }
  8.   RmDir (Foo);
  9.   if IOResult <> 0 then
  10.     WriteLn ('Directory ', foo, ' could not be removed.')
  11.   else
  12.     WriteLn ('Okay.')
  13. end.
  14.